package com.itheima.utils;


import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Data
@Document(indexName = "bloginfo", type = "docs")
public class BlogInfo {

  @Id
  @Field(index = true, store = true, type = FieldType.Keyword)
  private String uid;

  @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
  private String title;

  @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
  private String summary;

  @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
  private String content;

  @Field(index = false, store = true, type = FieldType.Text)
  private String tagUid;

  @Field(index = true, store = true, type = FieldType.Integer)
  private Integer clickCount;

  @Field(index = true, store = true, type = FieldType.Integer)
  private Integer collectCount;

  @Field(index = false, store = true, type = FieldType.Text)
  private String fileUid;

  @Field(index = true, store = true, type = FieldType.Keyword)
  private Integer status;

  @Field(index = true, store = true, type = FieldType.Date)
  private Date createTime;

  @Field(index = true, store = true, type = FieldType.Date)
  private Date updateTime;

  @Field(index = false, store = true, type = FieldType.Text)
  private String adminUid;

  @Field(index = true, store = true, type = FieldType.Keyword)
  private String isOriginal;

  @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
  private String author;

  @Field(index = true, store = true, type = FieldType.Text)
  private String articlesPart;

  @Field(index = true, store = true, type = FieldType.Text)
  private String blogSortUid;

  @Field(index = true, store = true, type = FieldType.Integer)
  private Integer level;

  @Field(index = true, store = true, type = FieldType.Keyword)
  private String isPublish;

  @Field(index = true, store = true, type = FieldType.Integer)
  private Integer sort;

  @Field(index = true, store = true, type = FieldType.Keyword)
  private Integer startComment;

}
